<?php
require_once $_SERVER['DOCUMENT_ROOT'].'/common.php';

$qs = str_replace(
	array("\t", "\n", "\r"),
	array('\t', '\n', '\r'),
	$_POST['qs']);

$fn = $_SERVER['DOCUMENT_ROOT']."/qs.txt";
$s = date("Y-m-d H:i:s")."\t".$_SESSION['user_id']."\t".$_SESSION['user_nickname']."\t".$qs."\n";

file_put_contents($fn, $s, FILE_APPEND);

sys::gotoUrl('/');